const { typesModel } = require('../models/typesModel')

module.exports.getTypeById = async function (req, res, next) {

  const data = req.body;
  console.log(data);
  const result = await typesModel.find(data)
  console.log(result);
  if (result.length > 0) {
    res.send({
      code: 1,
      message: "获取成功",
      result
    })
  }

};